import service from "@/utils/request";

/**
 * 获取问题列表
 * @param {Object} params
 * @returns
 */
export function getQuestionListService(params) {
  return service({
    url: "/question/list",
    method: "get",
    params,
  });
}
/**
 * 编辑问题
 * @param {Object} data
 * @returns
 */
export function editQuestionService(data = {}) {
  return service({
    url: "/question/edit",
    method: "put",
    data,
  });
}
/**
 * 添加问题
 * @param {Object} data
 * @returns
 */
export function addQuestionService(data = {}) {
  return service({
    url: "/question/add",
    method: "post",
    data,
  });
}
/**
 * 删除问题
 * @param {Object} params
 * @returns
 */
export function deleteQuestionService(questionId) {
  return service({
    url: "/question/delete",
    method: "delete",
    params: { questionId },
  });
}
/**
 * 获取问题详情
 * @param {Object} params
 * @returns
 */
export function getQuestionDetailService(questionId) {
  return service({
    url: "/question/detail",
    method: "get",
    params: { questionId },
  });
}
